package com.lagou.module01.service.imp;

import com.lagou.module01.bean.ClassGrade;
import com.lagou.module01.bean.PageBean;
import com.lagou.module01.dao.ClassGradeDao;
import com.lagou.module01.factory.DaoFactory;
import com.lagou.module01.service.ClassGradeService;

import java.util.List;

/**
 * @Author: xyk
 * @Date: Create in 23:14 2021/3/14
 * @Description:
 */
public class ClassGradeServiceImp implements ClassGradeService {

    // 自定义成员变量用户数据访问对象
    private ClassGradeDao classGradeDao;

    public ClassGradeServiceImp() {
       this.classGradeDao = DaoFactory.getClassGradeDao();
    }

    @Override
    public List<ClassGrade> showClassGradesService(PageBean pageBean) {
        return classGradeDao.classGradesShow(pageBean);
    }

    @Override
    public int countClassGradesService() {
        return classGradeDao.getClassGradeCount();
    }

    @Override
    public boolean insertClassGradesService(ClassGrade classGrade) {
        return classGradeDao.insertClassGrade(classGrade);
    }

    @Override
    public boolean editClassGradesService(ClassGrade classGrade) {
        return classGradeDao.editClassGrade(classGrade);
    }

    @Override
    public ClassGrade queryClassGradesService(String classId) {
        return classGradeDao.queryClassGrade(classId);
    }

    @Override
    public boolean deleteClassGradesService(String classId) {
        return classGradeDao.deleteClassGrade(classId);
    }

}
